#define _CRT_SECURE_NO_WARNINGS 1
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main()
{
	int x, y;
	scanf("%d %d", &x, &y);
	double n;
	n = x * 0.7 + y * 0.3;
	if (n >= 90) printf("A\n");
	else if (n >= 80) printf("B\n");
	else if (n >= 70) printf("C\n");
	else printf("D\n");
	return 0;
}
//5139